/**
 * 项目名：	Rumba Plan
 * 
 * 版权所有(C)，上海海鼎信息工程股份有限公司，2007，所有权利保留。
 * 
 * 文件名：	OptionalClassInfo.java
 * 模块说明：	
 * 修改历史：
 * 2007-3-15 - lxm - 创建。
 */
package com.hd123.rumba.option;

import com.hd123.rumba.exception.StringTooLongException;
import com.hd123.rumba.runtime.Persistent;

/**
 * 选项类信息 | 实体 | 实现类
 * 
 * @author lxm
 * 
 */
public class OptionalClassInfo extends Persistent implements IOptionalClassInfo {

  private String optionalClassName;
  private Integer individuation = COptionalClassInfo.VALUE_INDIVIDUATION_DOMAIN;
  private Boolean locked = Boolean.TRUE;
  private Boolean online = Boolean.FALSE;

  public Integer getIndividuation() {
    return individuation;
  }

  public void setIndividuation(Integer individuation) {
    this.individuation = individuation;
  }

  public Boolean getLocked() {
    return locked;
  }

  public void setLocked(Boolean locked) {
    this.locked = locked;
  }

  public Boolean getOnline() {
    return online;
  }

  public void setOnline(Boolean online) {
    this.online = online;
  }

  public String getOptionalClassName() {
    return optionalClassName;
  }

  public void setOptionalClassName(String optionalClassName) throws StringTooLongException {
    if (optionalClassName != null)
      optionalClassName = COptionalClassInfo.truncate(optionalClassName,
          COptionalClassInfo.LENGTH_OPTIONCLASSNAME, "optionalClassName",
          COptionalClassInfo.CAPTION_OPTIONALCLASSNAME);
    this.optionalClassName = optionalClassName;
  }

}
